package repository

func GetMaxHave(source int) (res int, err error) {
	res, err = RedisClient.Get(getMaxHaveKey(source)).Int()
	if err != nil {
		return
	}
	return
}

func getMaxHaveKey(source int) string {
	switch source {
	case 1:
		return "one"
	case 2:
		return "two"
	default:
		return "nil"
	}
}
